package com.yunhe.log.controller.base;

import com.yunhe.log.domain.base.SystemMonitorLogType;
import com.yunhe.common.model.PageParam;
import com.yunhe.common.model.ResultObject;
import com.yunhe.log.service.base.SystemMonitorLogTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "SystemMonitorLogType",description = "系统日志类型维护", tags = {"Base_SystemMonitorLogType"})
@RestController
@RequestMapping("/systemMonitorLogTypes")
public class SystemMonitorLogTypeController {

    @Autowired
    private SystemMonitorLogTypeService systemMonitorLogTypeService;

    @ApiOperation("根据条件查找系统日志类型")
    @RequestMapping(method = RequestMethod.GET)
    public ResponseEntity search(@ModelAttribute PageParam pageParam) {
        Iterable<SystemMonitorLogType> result = systemMonitorLogTypeService.findSystemMonitorLogTypes(pageParam);
        return new ResponseEntity<>(new ResultObject<>(result), HttpStatus.OK);
    }
}
